﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Draw</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body { 
	/* Default Font */
	font-family: 宋体, Arial, Helvetica, sans-serif;
	font-size: 10pt;
}
</style>

</head>

<body>
<P>
<TABLE style="BORDER-COLLAPSE: collapse" border=1 cellSpacing=0 
borderColor=#000000 cellPadding=1 width=800>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>定义</FONT></P></TD>
    <TD width=680><FONT size=2><STRONG><FONT color=#0000ff>C++：</FONT></STRONG><br>void Draw(int x, int y, xge::Surface* sf = NULL);<br>void 
      DrawEx(int x, int y, int cx, int cy, int cw, int ch, xge::Surface* sf =                NULL);<br>void Draw_Add(int x, int y, int mul = 255, xge::Surface* sf = NULL);<br>void DrawEx_Add(int x, 
      int y, int cx, int cy, int cw, int ch, int mul =            255, xge::Surface* sf =         NULL);<br>void Draw_Alpha(int x, int y, xge::Surface* sf = NULL);<br>void DrawEx_Alpha(int x, int y, int cx, int cy, int cw, int ch, xge::Surface* sf = NULL);<br>void Draw_Alpha2(int x, int y, int a, xge::Surface* sf = NULL);<br>void DrawEx_Alpha2(int x, int y, int cx, int cy, int cw, int ch, int a, xge::Surface* sf = NULL);<br>void Draw_And(int x, int y, xge::Surface* sf =               NULL);<br>void DrawEx_And(int x, int y, int cx, int cy, int cw, int ch, xge::Surface* sf = NULL);<br>void Draw_Or(int x, int y, xge::Surface* sf = NULL);<br>void DrawEx_Or(int x, int y, int cx, int cy, int cw, int ch, xge::Surface* sf = NULL);<br>void Draw_PSet(int x, int y, xge::Surface* sf = NULL);<br>void DrawEx_PSet(int x, int y, int cx, int cy, int cw, int ch, xge::Surface* sf = NULL);<br>void Draw_Xor(int x, int y, xge::Surface* sf = NULL);<br>void DrawEx_Xor(int x, int y, int cx, int cy, int cw, int ch, xge::Surface* sf = NULL);<br>void Draw_Gray(int x, int y, xge::Surface* sf = NULL);<br>void DrawEx_Gray(int x, int y, int cx, int cy, int cw, int ch, xge::Surface* sf = NULL);<br>void Draw_Mirr(int x, int y, int flag, xge::Surface* sf = NULL);<br>void DrawEx_Mirr(int x, int y, int cx, int cy, int cw, int ch, int flag, xge::Surface* sf = NULL);<br><br><STRONG><FONT color=#0000ff>FreeBasic：</FONT></STRONG><br>Sub Draw(x As Integer, y As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_Add(x As Integer, y As Integer, mul As Integer =     255, sf As xge.Surface Ptr =       NULL)<br>Sub DrawEx_Add(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, mul As Integer = 255, sf As xge.Surface Ptr = NULL)<br>Sub Draw_Alpha(x As Integer, y As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_Alpha(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_Alpha2(x As Integer, y As Integer, a As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_Alpha2(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, a As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_And(x As Integer, y As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_And(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_Or(x As Integer, y As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_Or(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_PSet(x As Integer, y As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_PSet(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_Xor(x As Integer, y As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_Xor(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_Gray(x As Integer, y As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_Gray(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, sf As xge.Surface Ptr = NULL)<br>Sub Draw_Mirr(x As Integer, y As Integer, flag As Integer, sf As xge.Surface Ptr = NULL)<br>Sub DrawEx_Mirr(x As Integer, y As Integer, cx As Integer, cy As Integer, cw As Integer, ch As Integer, flag As Integer, sf As xge.Surface Ptr = NULL)<br><br><STRONG><FONT color=#0000ff>SDK_C：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_BASIC：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_Pascal：</FONT></STRONG><br>暂未公布<br><br><STRONG><FONT color=#0000ff>SDK_易语言：</FONT></STRONG><br>暂未公布<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>功能</FONT></P></TD>
    <TD width=680><FONT size=2><br>将图像渲染到画面或另一幅图像中。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>参数</FONT></P></TD>
    <TD width=680><FONT size=2><br><STRONG><FONT color=#0000ff>x：</FONT></STRONG><br>将图像渲染到目标的横坐标。<br><br><STRONG><FONT color=#0000ff>y：</FONT></STRONG><br>将图像渲染到目标的纵坐标。<br><br><STRONG><FONT color=#0000ff>cx：</FONT></STRONG><br>裁剪图像的起始横坐标。<br><br><STRONG><FONT color=#0000ff>cy：</FONT></STRONG><br>裁剪图像的起始纵坐标。<br><br><STRONG><FONT color=#0000ff>cw：</FONT></STRONG><br>裁剪图像的宽度。<br><br><STRONG><FONT color=#0000ff>ch：</FONT></STRONG><br>裁剪图像的高度。<br><br><STRONG><FONT color=#0000ff>sf：</FONT></STRONG><br>将图像渲染到的目标图像，传递 NULL 则将图像渲染到场景中。<br><br><STRONG><FONT color=#0000ff>mul：</FONT></STRONG><br>进行加法混合的比例，源像素与目标像素混合前，会先使用此参数对自身数值分量进行削减。<br><br><STRONG><FONT color=#0000ff>a：</FONT></STRONG><br>半透明渲染时，指定的透明度，范围从 0 - 255。<br><br><STRONG><FONT color=#0000ff>flag：</FONT></STRONG><br>镜像渲染时，用于指定镜像的方式，可以是横向、纵向或是两者都有，参考 补充说明。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>返回值</FONT></P></TD>
    <TD width=680><FONT size=2><br>无返回值。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>补充说明</FONT></P></TD>
    <TD width=680><FONT size=2><br>Draw [使用透明色方式渲染图像(紫红色&amp;HFF00FF为XGE的固定透明色)]<br>Draw_Add [使用饱和加法方式渲染图像(多用于技能光效渲染)]<br>Draw_Alpha [渲染时使用图像自带的透明通道(仅支持32位模式)]<br>Draw_Alpha2 [使用半透明方式渲染图像]<br>Draw_And [使用And运算渲染图像(用于过滤颜色)]<br>Draw_Or [使用Or运算渲染图像(类似加色效果)]<br>Draw_PSet [原图方式画出(不使用透明色)]<br>Draw_Xor [使用Xor运算渲染图像(两次Xor运算后结果相同，利用此特性可以实现一些特殊效果)]<br>Draw_Gray [使用灰度运算渲染图像]<br>Draw_Mirr [使用镜像运算渲染图像，可以指定镜像的方式，可参考：<A href="../../def/mirr.htm">数据参考.镜像渲染</A>]<br><br>带有 Ex 的渲染模式在原有基础上允许对原图片进行裁剪，使用cx、cy、cw、ch四个参数确定裁剪的范围。<br><br></FONT></TD></TR>
  <TR>
    <TD width=120>
      <P align=center><FONT size=2>使用范例</FONT></P></TD>
    <TD width=680><FONT size=2><br><STRONG><FONT color=#0000ff>C++：</FONT></STRONG><br>参考开发包范例文件夹 4.渲染方式。<br><br><STRONG><FONT color=#0000ff>FreeBasic：</FONT></STRONG><br>参考开发包范例文件夹 4.渲染方式。</FONT></TD></TR></TABLE></P></body></HTML>